//
// Created by yu on 2023/10/14.
//

#pragma once
#include "CANFrame.h"

class lkMotor
{
 public:
////  从车屁股看的左右   左0x141,右0x142
  struct motorData
  {
  int speed;
  int location;
  }leftLK,rightLK;

////  电机运行
  void motorRun(uint32_t id);
////  电机停止
  void motorStop(uint32_t id);
////  电机关闭
  void motorOff(uint32_t id);

////  速度控制
  int SpeedControl(uint32_t id, uint32_t speed);

////  力矩控制
  void TorqueControl(uint32_t id, float torque);

////  读取编码器
  int ReadEncoder(uint32_t id);
////  读取加速度
  int ReadAcceleration(uint32_t id);
} inline lkMotor;